#ifndef GEOMETRY_H_
#define GEOMETRY_H_
#pragma once

#include <D3DX10math.h>

// position texture normal
namespace ptn {
struct Vertex {
	D3DXVECTOR3 position;
	D3DXVECTOR2 texcoord;
	D3DXVECTOR3 normal;
};

const D3D10_INPUT_ELEMENT_DESC layout[] = { { "POSITION", 0,
		DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 }, {
		"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12,
		D3D10_INPUT_PER_VERTEX_DATA, 0 }, { "NORMAL", 0,
		DXGI_FORMAT_R32G32B32_FLOAT, 0, 20, D3D10_INPUT_PER_VERTEX_DATA, 0 }, };

const UINT numElements = sizeof(layout) / sizeof(layout[0]);

Vertex CreateVertex(D3DXVECTOR3 position, D3DXVECTOR2 texcoord,
		D3DXVECTOR3 normal);

}

// postition - colour
namespace pc {
struct Vertex {
	D3DXVECTOR3 position;
	D3DXVECTOR4 colour;
};

// POD functions
Vertex CreateVertex(D3DXVECTOR3 position, D3DXVECTOR4 colour);

const D3D10_INPUT_ELEMENT_DESC layout[] = { { "POSITION", 0,
		DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 }, {
		"COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 12,
		D3D10_INPUT_PER_VERTEX_DATA, 0 } };

const UINT numElements = sizeof(layout) / sizeof(layout[0]);
}

// position texture
namespace pt
{
	struct Vertex
	{
		D3DXVECTOR3 position;
		D3DXVECTOR2 texcoord;
	};

	Vertex CreateVertex(D3DXVECTOR3 position, D3DXVECTOR2 texcoord);
	const D3D10_INPUT_ELEMENT_DESC layout[] = { { "POSITION", 0,
		DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 }, {
		"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12,
		D3D10_INPUT_PER_VERTEX_DATA, 0 } };

	const UINT numElements = sizeof(layout) / sizeof(layout[0]);
}
#endif
